<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Welcome extends CI_Controller {

	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -  
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in 
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see http://codeigniter.com/user_guide/general/urls.html
	 */
	public function index()
	{
            
            $data['id_style']= 'inicio';
            $data['page']= 'inicio';
            
            $this->load->view('ciudad/index', $data);
	}
        
        
        
        
        
        function proyectos(){
            $data['id_style'] = 'col_2';
            $data['page'] = 'detalle_proyecto';
            $this->MWelcome->fillCampos('proyectos','4');
             
           $data['titulo'] = $this->MWelcome->getCampo('titulo');
           $data['descripcion'] = $this->MWelcome->getCampo('descripcion');
           $data['bajada'] = $this->MWelcome->getCampo('bajada');
           $data['provincia_nombre'] = $this->MWelcome->getCampo('provincia_nombre');
      
           //$data['map']=$this->_maps();
          
            
            $this->load->view('ciudad/index',$data);
        }
        function historias(){
            $data['id_style'] = 'col_2';
            $data['page'] = 'detalle_historia';
            $this->MWelcome->fillCampos('historias','1');
             
           $data['titulo'] = $this->MWelcome->getCampo('titulo');
           $data['descripcion'] = $this->MWelcome->getCampo('descripcion');
           $data['bajada'] = $this->MWelcome->getCampo('bajada');
           //$data['provincia_nombre'] = $this->MWelcome->getCampo('provincia_nombre');
           
           
           
            
            $this->load->view('ciudad/index',$data);
        }
    
    
    function listados_proyectos(){
            $data['id_style'] = 'listado';
            $data['page'] = 'listado_proyecto';
            $this->MWelcome->fillCampos('proyectos','', true);
            $data['nombre_provincias'] = $this->MWelcome->getListado();
            
            
          
            
            $this->load->view('ciudad/index',$data);
        
    }
    
    
    
    
    function _maps() {
            $this->load->library('googlemaps');

            $config['center'] = '-31.6323891,-60.6994591';
            $config['zoom'] = '15';
            $config['styles'] = array(
  array("name"=>"Red Parks", "definition"=>array(
    array("featureType"=>"all", "stylers"=>array(array("saturation"=>"-30"))),
    array("featureType"=>"poi.park", "stylers"=>array(array("saturation"=>"20"), array("hue"=>"#ff0000")))
  )),
  array("name"=>"Black Roads", "definition"=>array(
    array("featureType"=>"all", "stylers"=>array(array("saturation"=>"-70"))),
    array("featureType"=>"road.arterial", "elementType"=>"geometry", "stylers"=>array(array("hue"=>"#ffffff")))
  )),
  array("name"=>"No Businesses", "definition"=>array(
    array("featureType"=>"poi.business", "elementType"=>"labels", "stylers"=>array(array("visibility"=>"off")))
  ))
);
            //$config['stylesAsMapTypes'] = true;
            $config['stylesAsMapTypesDefault'] = "Black Roads";
            $this->googlemaps->initialize($config);


//            $groundOverlay = array();
//            $groundOverlay['image'] = 'http://maps.google.com/intl/en_ALL/images/logos/maps_logo.gif';
//            $groundOverlay['positionSW'] = '-31.6323891,-60.6994591';
//            $groundOverlay['positionNE'] = '-31.0323891,-59.6994591';
//            $this->googlemaps->add_ground_overlay($groundOverlay);


            $circle = array();
            $circle['center'] = '-31.6323891,-60.6994591';
            $circle['radius'] = '250';
            $this->googlemaps->add_circle($circle);

            $marker = array();
            $marker['position'] = '-31.6323891,-60.6994591';


            return $data['map'] = $this->googlemaps->create_map();
        }
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */